package com.idea.id_generate.rest;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 错误代码
 */
public class ResponseCode {

    // 成功
    public static final int SUCCESS = 0;

    //失败
    public static final int FAILED = -1;

    //失败
    public static final int FAILED_NULL_POINTER_EXCEPTION = -2;

    //失败
    public static final int FAILED_ILLEGAL_ARGUMENT_EXCEPTION = -3;

    //异步任务失败
    public static final int FAILED_TASK_REJECTED_EXCEPTION = -4;

    //系统错误
    public static final int SYSTEM_EXCEPTION = 500;
    public static final String SYSTEM_EXCEPTION_RETURN_MESSAGE = "系统错误";
    public static final String SYSTEM_EXCEPTION_MESSAGE = "系统错误";

    @Getter
    @AllArgsConstructor
    public enum IdError {
        GET_ID_ERROR(15001, "获取ID错误"),
        GEE_TEST_VERIFY_FAIL(15002, "未通过极验验证"),
        GET_GEE_TEST_CAPTCHA(15003, "获取极验验证码失败");
        // 商品错误枚举值
        private int code;
        // 枚举说明
        private String message;
    }

}
